package be.tihh.mgmt.actions;

public abstract class ActionResult {

    public static boolean OK = true;
    public static boolean NOT_OK = false;

    protected boolean result;
    protected Object resultData;

    protected ActionResult(boolean result, Object resultData) {
        this.result = result;
        this.resultData = resultData;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public void setResultData(Object resultData) {
        this.resultData = resultData;
    }

    /**
     * Returns whether the result is OK or not
     * @return OK (true) or NOT_OK (false)
     */
    public boolean getResult(){
        return result;
    }

    /**
     * Returns an object that can contain more info about the action that was performed.
     * @return an object containing more info about the action
     */
    public Object getResultData(){
        return resultData;
    }

}
